<%@ page import="sige.AnoLetivo" %>
<!doctype html>
<html>
    <head>
        <meta name="layout" content="main">
        <g:set var="entityName" value="${message(code: 'anoLetivo.label', default: 'AnoLetivo')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <center>
          <h1><g:message code="default.show.label" args="[entityName]" /></h1>
        </center>
        <ul class="breadcrumb">
            <li>
                <a href="${createLink(uri: '/')}">
                  <i class="icon-home"></i>
                  <g:message code="default.home.label"/>
                </a>
                <span class="divider"> . </span>
            </li>
            <li>
                <g:link action="list">
                    <i class="icon-list"></i>
                    <g:message code="default.list.label" args="[entityName]" />
                </g:link>
                <span class="divider"> . </span>
            </li>
            <li>
                <g:link class="create" action="create">
                    <i class="icon-file"></i>
                    <g:message code="default.new.label" args="[entityName]" />
                </g:link>
            </li>
        </ul>
        <div id="show-anoLetivo" class="content scaffold-show" role="main">
            
            <g:if test="${flash.message}">
              <div class="alert alert-info">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                ${flash.message}
              </div>
            </g:if>
            <div class="span8 offset3">
                <div class="span8 well">   
                <ol class="property-list anoLetivo">
			
				<g:if test="${anoLetivoInstance?.ano}">
				<li class="fieldcontain">
					<span id="ano-label" class="property-label"><g:message code="anoLetivo.ano.label" default="Ano" /></span>
					
						<span class="property-value" aria-labelledby="ano-label"><g:fieldValue bean="${anoLetivoInstance}" field="ano"/></span>
					
				</li>
				</g:if>
				
				<g:if test="${anoLetivoInstance?.dataDeInicio}">
				<li class="fieldcontain">
					<span id="dataDeInicio-label" class="property-label"><g:message code="anoLetivo.dataDeInicio.label" default="Data De Inicio" /></span>
					
						<span class="property-value" aria-labelledby="dataDeInicio-label"><g:formatDate date="${anoLetivoInstance?.dataDeInicio}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${anoLetivoInstance?.dataDeFechamento}">
				<li class="fieldcontain">
					<span id="dataDeFechamento-label" class="property-label"><g:message code="anoLetivo.dataDeFechamento.label" default="Data De Fechamento" /></span>
					
						<span class="property-value" aria-labelledby="dataDeFechamento-label"><g:formatDate date="${anoLetivoInstance?.dataDeFechamento}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${anoLetivoInstance?.turmas}">
				<li class="fieldcontain">
					<span id="turmas-label" class="property-label"><g:message code="anoLetivo.turmas.label" default="Turmas" /></span>
					
						<g:each in="${anoLetivoInstance.turmas}" var="s">
						<span class="property-value" aria-labelledby="turmas-label"><g:link controller="serie" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
			</ol>
			
			<!------------------PRIMEIRO SEMESTRE------------------------>
			
			<ul class="offset1">
			    <b>Primeiro Semestre</b>
				<g:if test="${anoLetivoInstance?.semestre_1?.dataDeInicio}">
				<li class="fieldcontain">
					<span><g:message format="dd/MM/yyyy" code="semestre.dataDeInicio.label" default="Data De Inicio" /></span>
					
					<span><g:formatDate date="${anoLetivoInstance?.semestre_1?.dataDeInicio}" /></span>
					
				</li>
				</g:if>
				
				<g:if test="${anoLetivoInstance?.semestre_1?.dataDeFechamento}">
				<li class="fieldcontain">
					<span id="dataDeFechamento-label" class="property-label"><g:message code="semestre.dataDeFechamento.label" default="Data De Fechamento" /></span>
					
						<span><g:formatDate format="dd/MM/yyyy" date="${anoLetivoInstance?.semestre_1?.dataDeFechamento}" /></span>
					
				</li>
				</g:if>
			</ul>
			<ul class="offset2">
			    <b>Primeiro Bimestre</b>
				<g:if test="${anoLetivoInstance?.semestre_1?.bimestre_1?.dataDeInicio}">
				<li class="fieldcontain">
					<span><g:message format="dd/MM/yyyy" code="bimestre.dataDeInicio.label" default="Data De Inicio" /></span>
					
					<span><g:formatDate date="${anoLetivoInstance?.semestre_1?.bimestre_1?.dataDeInicio}" /></span>
					
				</li>
				</g:if>
				
				<g:if test="${anoLetivoInstance?.semestre_1?.bimestre_1?.dataDeFechamento}">
				<li class="fieldcontain">
					<span id="dataDeFechamento-label" class="property-label"><g:message code="semestre.dataDeFechamento.label" default="Data De Fechamento" /></span>
					
						<span><g:formatDate format="dd/MM/yyyy" date="${anoLetivoInstance?.semestre_1?.bimestre_1?.dataDeFechamento}" /></span>
					
				</li>
				</g:if>
			</ul>
			<ul class="offset2">
			    <b>Segundo Bimestre</b>
				<g:if test="${anoLetivoInstance?.semestre_1?.bimestre_2?.dataDeInicio}">
				<li class="fieldcontain">
					<span><g:message format="dd/MM/yyyy" code="bimestre.dataDeInicio.label" default="Data De Inicio" /></span>
					
					<span><g:formatDate date="${anoLetivoInstance?.semestre_1?.bimestre_2?.dataDeInicio}" /></span>
					
				</li>
				</g:if>
				
				<g:if test="${anoLetivoInstance?.semestre_1?.bimestre_2?.dataDeFechamento}">
				<li class="fieldcontain">
					<span id="dataDeFechamento-label" class="property-label"><g:message code="semestre.dataDeFechamento.label" default="Data De Fechamento" /></span>
					
						<span><g:formatDate format="dd/MM/yyyy" date="${anoLetivoInstance?.semestre_1?.bimestre_2?.dataDeFechamento}" /></span>
					
				</li>
				</g:if>
			</ul>
			
			<!--------------SEGUNDO SEMESTRE----------------->
			
			<ul class="offset1">
			    <b>Segundo Semestre</b>
				<g:if test="${anoLetivoInstance?.semestre_2?.dataDeInicio}">
				<li class="fieldcontain">
					<span><g:message format="dd/MM/yyyy" code="semestre.dataDeInicio.label" default="Data De Inicio" /></span>
					<span><g:formatDate date="${anoLetivoInstance?.semestre_2?.dataDeInicio}" /></span>
					
				</li>
				</g:if>
				
				<g:if test="${anoLetivoInstance?.semestre_2?.dataDeFechamento}">
				<li class="fieldcontain">
					<span id="dataDeFechamento-label" class="property-label"><g:message code="semestre.dataDeFechamento.label" default="Data De Fechamento" /></span>
					<span><g:formatDate format="dd/MM/yyyy" date="${anoLetivoInstance?.semestre_2?.dataDeFechamento}" /></span>
					
				</li>
				</g:if>
			</ul>
			<ul class="offset2">
			    <b>Terceiro Bimestre</b>
				<g:if test="${anoLetivoInstance?.semestre_2?.bimestre_1?.dataDeInicio}">
				<li class="fieldcontain">
					<span><g:message format="dd/MM/yyyy" code="bimestre.dataDeInicio.label" default="Data De Inicio" /></span>
					<span><g:formatDate date="${anoLetivoInstance?.semestre_2?.bimestre_1?.dataDeInicio}" /></span>
					
				</li>
				</g:if>
				
				<g:if test="${anoLetivoInstance?.semestre_2?.bimestre_1?.dataDeFechamento}">
				<li class="fieldcontain">
					<span id="dataDeFechamento-label" class="property-label"><g:message code="semestre.dataDeFechamento.label" default="Data De Fechamento" /></span>
					<span><g:formatDate format="dd/MM/yyyy" date="${anoLetivoInstance?.semestre_2?.bimestre_1?.dataDeFechamento}" /></span>
					
				</li>
				</g:if>
			</ul>
			<ul class="offset2">
			    <b>Quarto Bimestre</b>
				<g:if test="${anoLetivoInstance?.semestre_2?.bimestre_2?.dataDeInicio}">
				<li class="fieldcontain">
					<span><g:message format="dd/MM/yyyy" code="bimestre.dataDeInicio.label" default="Data De Inicio" /></span>
					
					<span><g:formatDate date="${anoLetivoInstance?.semestre_2?.bimestre_2?.dataDeInicio}" /></span>
					
				</li>
				</g:if>
				
				<g:if test="${anoLetivoInstance?.semestre_2?.bimestre_2?.dataDeFechamento}">
				<li class="fieldcontain">
					<span id="dataDeFechamento-label" class="property-label"><g:message code="semestre.dataDeFechamento.label" default="Data De Fechamento" /></span>
					<span><g:formatDate format="dd/MM/yyyy" date="${anoLetivoInstance?.semestre_2?.bimestre_2?.dataDeFechamento}" /></span>
					
				</li>
				</g:if>
			</ul>

                </div>
                <g:form>
                    <fieldset class="form-actions span8">
                        <g:hiddenField name="id" value="${anoLetivoInstance?.id}" />
                        <g:link class="btn btn-warning" action="edit" id="${anoLetivoInstance?.id}">
                            <i class="icon-edit icon-white"></i>
                            <g:message code="default.button.edit.label" default="Edit" />
                        </g:link>
                        <a data-toggle="modal" href="#myModal" class="btn btn-danger">
                            <i class="icon-trash icon-white"></i>
                            <g:message code="default.button.delete.label" default="Delete" /> 
                        </a>
                    </fieldset>
                    <!--------MODAL----------->
                    <div class="modal hide" id="myModal">
                        <div class="modal-header">
                            <a class="close" data-dismiss="modal">×</a>
                            <h3><g:message code="default.button.delete.atention.message" default="Atenção!" /></h3>
                        </div>
                        <div class="modal-body">
                            <p><g:message code="default.button.delete.confirm.message" default="Are you sure?" /> </p>
                        </div>
                        <div class="modal-footer">
                            <a class="btn" data-dismiss="modal">
                                <g:message code="default.cancel.label" default="Cancelar" />
                            </a>
                            <g:actionSubmit class="btn btn-danger" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" />
                        </div>
                    </div>
                </g:form>
            </div><!--/span8-->
        </div><!--/show-anoLetivo-->
    </body>
</html>
